package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.QQrAddress;
import com.ruowei.modules.foodOrder.domain.QrAddress;

import jdk.nashorn.internal.objects.NativeArray;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Spring Data  repository for the QrAddress entity.
 */
@SuppressWarnings("unused")
@Repository
public interface QrAddressRepository extends BaseRepository<Long, QrAddress, QQrAddress> {
    Optional<QrAddress> findByDetailAddress(String addressCode);

    List<QrAddress> findAllByStatus(boolean status);

    Boolean existsByDetailAddressAndStatusAndIdNot(String detailAddress, boolean status, Long id);

    Optional<QrAddress> findByDetailAddressAndStatus(String address, boolean status);
}
